package org.example.sping02.config;

import com.alibaba.fastjson.JSONObject;
import org.example.sping02.entity.Person;
import org.springframework.context.annotation.*;

@ComponentScan("org.example")
@Configuration
@Import(JSONObject.class)
public class Appconfig {


    @Scope("singleton")
    @Lazy  //延迟加载, 容器启动时不创建对象
    @Bean
    public Person person(){
        return new Person();
    }

}